#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QVector>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include "rfidthread.h"
#include "weightthread.h"
QT_BEGIN_NAMESPACE
namespace Ui { class mainWidget; }
QT_END_NAMESPACE
using namespace QtCharts;
class mainWidget : public QWidget
{
    Q_OBJECT

public:
    mainWidget(QWidget *parent = nullptr);
    ~mainWidget();

signals:
    void closeRFID();
    void closeWEIGHT();

private slots:
    void on_weight_Btn_toggled(bool checked);
    void on_RFID_Btn_toggled(bool checked);

private:
    Ui::mainWidget *ui;
    QChart *chart;
    QChartView *chartView;
    QVector<QLineSeries *> series_vec;
//    QLineSeries* series;
    QVector<int> weights;
    RFIDThread* rfidThread;
    WEIGHTThread* weightThread;
};
#endif // MAINWIDGET_H
